package com.huilai.platform.country_platform.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.util.Date;

/**
 * 作者：洪霓
 * 日期：2023/3/6
 * 注释：
 */
@Entity
@Table(name = "party_activities")
@EntityListeners(AuditingEntityListener.class)
@JsonIgnoreProperties(value = { "hibernateLazyInitializer"})
public class PartyActivities {
    /**
     * 党员活动信息id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Integer id;
    /**
     * 信息image
     */
    @Column(name = "image")
    private String image;
    /**
     * 标题
     */
    @Column(name = "title")
    private String title;
    /**
     * 党员活动信息描述
     */
    @Column(name = "describe")
    private String describe;

    /**
     * 区分不同类型开信息（1234)
     */
    @Column(name = "contentType")
    private String contentType;
    /**
     * 文件名称
     */
    @Column(name = "file")
    private String file;

    @CreatedDate
    @Column(name = "create_time")
    private Date createTime;


    @LastModifiedDate
    @Column(name = "update_time")
    private Date updateTime;

    public PartyActivities(){};

    public PartyActivities(Integer id, String image, String  title, String describe, String contentType, String  file){
        this.id = id;
        this.image = image;
        this.title = title;
        this.describe  =describe;
        this.contentType = contentType;
        this.file = file;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescribe() {
        return describe;
    }

    public void setDescribe(String describe) {
        this.describe = describe;
    }

    public String getContentType() {
        return contentType;
    }

    public void setContentType(String contentType) {
        this.contentType = contentType;
    }

    public String getFile() {
        return file;
    }

    public void setFile(String file) {
        this.file = file;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}
